<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Student Information</title>
</head>

<body bgcolor="#CCCCCC">
<br>
<table width="800" height="494" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <th height="62" colspan="2" style=" background-color:#F90" scope="col"><font color="#FFFFFF">Exam Room Management<font></th>
  </tr>
  <tr>
    <th width="190" height="427" scope="row" style="background-color:#F90" > <div align="center"><b><font color="#FFFFFF">Menu<font><br><br>
      <center xmlns="http://www.w3.org/1999/xhtml">
		<br /><input type="button" onClick="window.location.href='http://127.0.0.1:8000/student/addSub/{{ std.stdID }}/'" value="Add Subject"><br />
		<br /><input type="button" onClick="window.location.href='http://127.0.0.1:8000/student/edit/{{ std.stdID }}/'" value="Edit"><br />
		<br /><input type="button" onClick="window.location.href='http://127.0.0.1:8000/student/deleting/{{ std.stdID }}/'" value="Delete"><br />		
		<br /><input type="button" onClick="window.location.href='http://127.0.0.1:8000/student/'" value="Back">
		</center>
    </div>
    </th>
    <td width="610" style="background-color:#FFF"> <center><h3>Student Information</h3><br>
{% if std %}	
			<center><table cellpadding="5" cellspacing="10"<tr><td >  							
			<p>Student ID : {{ std.stdID }}</p>
			<p>Student Name : {{ std.stdName }}</p>
			{% if arrInfo %}
				{% for info in arrInfo %}				
					<center><fieldset>
					<legend>{{ info.1 }}</legend>
					Subject : {{ info.0 }} {{ info.1 }}<br/>
					Room : {{ info.2 }}<br/>
					Date : {{ info.3 }}<br/>
					Time : {{ info.4 }}<br/>
					<center><input type="button" onClick="window.location.href='http://127.0.0.1:8000/seat/view/{{ std.stdID }}/{{ info.2 }}/{{ info.3 }}/{{ info.4 }}'" value="view seat"></center>
					<center><input type="button" onClick="window.location.href='http://127.0.0.1:8000/seat/deleted/{{ std.stdID }}/{{ info.1 }}/{{ info.2 }}'" value="Delete"></center>					
					</fieldset></center><br/>
				{% endfor %}
			{% endif %}
			</table></center>
			{% if deleting %}
			<script type="text/javascript">
			var r=confirm("Are you sure you want to delete?");
			if (r==true){
			  alert("Information has been deleted!");
			  window.location.href='http://127.0.0.1:8000/student/deleted/{{ std.stdID }}/'
			}
			else{
			  window.location.href='http://127.0.0.1:8000/student/{{ std.stdID }}/'
			}			
			</script>
			{% endif %}	
		{% else %}
			<p>No Information.</p>
		{% endif %}
		</td></tr>
		</table>				
<br>
<br>
<br>
</body>
</html>
